import axios from './axios'
import qs from 'qs'
import { apiUrl, appUrl } from '@/config/config'

// 课程表
export const timeApi = (params) => {
  return new Promise((resolve, reject) => {
    axios({
      url: appUrl + '/school/api/home/schedules/singel',
      method: 'get',
      params
    }).then(res => {
      resolve(res)
    }).catch(err => {
      reject(err)
    })
  })
}

// 课程表 (新)
export const newTimeApi = (params) => {
  return new Promise((resolve, reject) => {
    axios({
      url: appUrl + '/school/api/classroom/classSchedule',
      method: 'get',
      params
    }).then(res => {
      resolve(res.data)
    }).catch(err => {
      reject(err)
    })
  })
}
